package com.nighthawkV2;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.util.Log;


public class MainActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        View startButton = findViewById(R.id.main_start_button);
        startButton.setOnClickListener(this);
        
        View aboutButton = findViewById(R.id.main_about_button);
        aboutButton.setOnClickListener(this);
        
        View settingsButton = findViewById(R.id.main_settings_button);
        settingsButton.setOnClickListener(this);
        
        View exitButton = findViewById(R.id.main_exit_button);
        exitButton.setOnClickListener(this);
    }
    
    public void onClick(View v){
    	switch (v.getId()){
    	case R.id.main_start_button:
    		Log.v("YO", "hi");
    		Intent startIntent = new Intent(this, RuleActivity.class);
    		startActivity(startIntent);
    		Log.v("YO2", "hi2");
    		break;
    	case R.id.main_about_button:
    		Intent aboutIntent = new Intent(this, AboutActivity.class);
    		startActivity(aboutIntent);
    		break;
    	case R.id.main_settings_button:
    		Intent settingsIntent = new Intent(this, SettingsActivity.class);
    		startActivity(settingsIntent);
    		break;
    	case R.id.main_exit_button:
    		finish();
    		break;
    	}
    }
}